<!--
 * @Description: 
 * @Author: william
 * @Date: 2025-05-28 17:26:49
 * @LastEditors: william
 * @LastEditTime: 2025-09-01 16:17:44
-->
<template>
  <div class="home-page-wrap">
    <div class="wrap-title">今日实况</div>
    <div class="four-border-blueBg">
      <div class="statistics-wrap">
        <div class="child-item">
          <div class="text">烹饪菜品总数</div>
          <div class="number">--份</div>
        </div>
        <div class="child-item">
          <div class="text">烹饪总时长</div>
          <div class="number">10小时20分</div>
        </div>
        <div class="child-item">
          <div class="text">平均烹饪时长</div>
          <div class="number">2分25秒</div>
        </div>
        <div class="child-item">
          <div class="text">食材消耗</div>
          <div class="number">--千克</div>
        </div>
        <div class="child-item">
          <div class="text">用电</div>
          <div class="number">--度</div>
        </div>
        <div class="child-item">
          <div class="text">用水</div>
          <div class="number">--吨</div>
        </div>
        <div class="child-item">
          <div class="text">炒菜机工作</div>
          <div class="number">--台</div>
        </div>
      </div>
    </div>
    <el-row :gutter="4" class="row-wrap">
      <el-col :span="24" :lg="12" :xl="12">
        <div class="wrap-title">菜品烹饪数量(top10)</div>
        <div class="chart-wrapper four-border-blueBg">
          <BarChart />
        </div>
      </el-col>
      <el-col :span="24" :lg="12" :xl="12">
        <div class="wrap-title">食材消耗数量(top10)</div>
        <div class="chart-wrapper four-border-blueBg">
          <BarChart />
        </div>
      </el-col>
    </el-row>

    <!-- <footer>
      <div class="text-center">
        <el-link
          class="linkStyle"
          href="https://cn.neoway.com/"
          target="_blank"
          type="primary"
          >{{ $t('public.neoway') }}</el-link
        >
        <el-link
          class="linkStyle"
          href="https://iot.neoway.com/channel/#/dashboard"
          target="_blank"
          type="primary"
          >{{ $t('public.youfangInfoCenter') }}</el-link
        >
        <el-link
          class="linkStyle"
          href="https://iot.neoway.com/channel/#/guideDownload"
          target="_blank"
          type="primary"
          >{{ $t('public.networkMonitorAppDownload') }}</el-link
        >
      </div>
      <p class="text-center">
        {{ $t('home.Copyright', { version: defaultSettings.version }) }}
      </p>
    </footer> -->
  </div>
</template>

<script setup>
import BarChart from './component/BarChart.vue'

const loading = ref(false)

onMounted(() => {
  loading.value = true
})

//
</script>

<style lang="scss" scoped>
.wrap-title {
  display: flex;
  align-items: center;
  margin: 8px 0;
  font-size: 18px;
  font-weight: bold;
  color: var(--color-333);
  text-align: center;

  &:before {
    content: '';
    width: 4px;
    height: 20px;
    margin-right: 10px;
    background: var(--color-primary-green);
    border-radius: 4px;
  }
}

.statistics-wrap {
  display: flex;
  flex-wrap: wrap;
  padding: 10px;
  background-color: var(--menu-theme-bg);

  .child-item {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 10px;
    border-radius: 5px;
    + .child-item {
      &::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        display: block;
        width: 1px;
        height: 36px;
        background-color: #e5e5e5;
      }
    }
    .text {
      font-size: 14px;
      color: var(--device-statistics-text-color);
    }

    .number {
      margin-top: 4px;
      font-size: 24px;
      color: var(--device-statistics-text-color2);
      font-weight: bold;
    }
  }
}
</style>
